package com.zb.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * <p>
 * 工单表
 * </p>
 *
 * @author WEN
 * @since 2024-02-24
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="ZjWorkOrder对象", description="工单表")
public class ZjWorkOrder implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主健ID")
    @TableId(value = "id", type = IdType.NONE)
    private Long id;

    @ApiModelProperty(value = "商家ID")
    private Long custAccId;

    @ApiModelProperty(value = "品牌厂商ID")
    private Long factoryId;

    @ApiModelProperty(value = "工单单号")
    private String code;

    @ApiModelProperty(value = "工单状态：1-待派单，2-待服务商确认，3-处理中，4-已完成，5-已作废")
    private Integer status;

    @ApiModelProperty(value = "是否工单存档：0-否，1-是")
    @TableField("is_archived")
    private Boolean archived;

    @ApiModelProperty(value = "工单存档时间")
    private Date archivedTime;

    @ApiModelProperty(value = "工单模块表ID")
    private Long moduleId;

    @ApiModelProperty(value = "是否分派客服：0-否，1-是")
    @TableField("is_assign_emp")
    private Boolean assignEmp;

    @ApiModelProperty(value = "人员表ID，即客服ID")
    private Long empId;

    @ApiModelProperty(value = "分派客服时间")
    private Date assignEmpTime;

    @ApiModelProperty(value = "网点表ID")
    private Long networkId;

    @ApiModelProperty(value = "网点工程师/服务商人员表ID")
    private Long networkEmpId;

    @ApiModelProperty(value = "期望开始上门日期")
    private Date expectedDate;

    @ApiModelProperty(value = "期望开始上门时间")
    private Date expectedStartTime;

    @ApiModelProperty(value = "期望结束上门时间")
    private Date expectedEndTime;

    @ApiModelProperty(value = "工单完成时间")
    private Date endTime;

    @ApiModelProperty(value = "工单取消/作废时间")
    private Date cancelTime;

    @ApiModelProperty(value = "新进展，即无需处理的进展")
    private Integer newAdvance;

    @ApiModelProperty(value = "待处理事件数量")
    private Integer waitCopeEvent;

    @ApiModelProperty(value = "质保状态，是否保外：0-否、保内，1-是、保外")
    @TableField("is_overinsured")
    private Boolean overinsured;

    @ApiModelProperty(value = "催单数量")
    private Integer reminderNum;

    @ApiModelProperty(value = "工单质保天数")
    private Integer warrantyDay;

    @ApiModelProperty(value = "工单来源有：1-平台系统报单，2-扫码报单，3-小程序报单，4-APP报单，5-Excel导入报单，6-品牌商家建单，7-平台代商家报单，8-品牌商家Excel导入，9-乐开伙伴云")
    private Integer source;

    @ApiModelProperty(value = "工单级别ID")
    private Long workLevelId;

    @ApiModelProperty(value = "是否全包费用(配件费+服务费)：0-否，1-是")
    @TableField(value = "is_all_inclusive_fee")
    private Boolean allInclusiveFee;

    @ApiModelProperty(value = "模块费用")
    private BigDecimal modulePrice;

    @ApiModelProperty(value = "服务商模块费用")
    private BigDecimal networkModulePrice;

    @ApiModelProperty(value = "收取客户费用")
    private BigDecimal collectCustomerPrice;

    @ApiModelProperty(value = "品牌商家结算扣减价")
    private BigDecimal factorySettlementDeductionPrice;

    @ApiModelProperty(value = "服务商结算扣减价")
    private BigDecimal networkSettlementDeductionPrice;


//    @ApiModelProperty(value = "总费用")
//    private BigDecimal totalPrice;
//
//    @ApiModelProperty(value = "支出费用")
//    private BigDecimal payPrice;
//
//    @ApiModelProperty(value = "收入费用")
//    private BigDecimal incomePrice;

    @ApiModelProperty(value = "是否结单：0-否，1-是")
    @TableField("is_end_order")
    private Boolean endOrder;

    @ApiModelProperty(value = "工单结算状态：0-无，1-待结算，2-结算中，3-已结算")
    private Integer settlementStatus;

    @ApiModelProperty(value = "结算时间")
    private Date settlementTime;

    @ApiModelProperty(value = "提现冻结天数")
    private Integer withdrawFreezeDay;

    @ApiModelProperty(value = "是否评价 0：否，1：是")
    @TableField("is_comment")
    private Boolean comment;

    @ApiModelProperty(value = "评价时间")
    private Date commentTime;

    @ApiModelProperty(value = "是否j是改派工单：0-否，1-是")
    @TableField("is_change_order")
    private Boolean changeOrder;

    @ApiModelProperty(value = "工单挂起状态：0-无，1-已申请挂起，2-挂起")
    private Integer suspendStatus;

    @ApiModelProperty(value = "暂停/挂起时间")
    private Date suspendTime;

    @ApiModelProperty(value = "商家备注")
    private String factoryRemark;

    @ApiModelProperty(value = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    private Date gmtCreate;

    @ApiModelProperty(value = "更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date gmtUpdate;

    @ApiModelProperty(value = "创建人类型：1-系统客服，2-客户，3-品牌商家，4-乐开伙伴云")
    private Integer createEmpType;

    @ApiModelProperty(value = "所属品牌商家")
    private String createFactory;

    @ApiModelProperty(value = "创建人员ID")
    private Long createEmpId;

    @ApiModelProperty(value = "创建人员")
    private String createEmp;

    @ApiModelProperty(value = "更新人员ID")
    private Long updateEmpId;

    @ApiModelProperty(value = "更新人员")
    private String updateEmp;

    @ApiModelProperty(value = "电信客户产品识别码，根据此判断结单时是否必填sn码，也根据此字段判别是否为电信客户")
    private String teleCustomProIdenCode;

    @ApiModelProperty(value = "分机号")
    private String extensionNbr;
    @ApiModelProperty("第三方推送状态")
    private Integer thirdPushState;
    @ApiModelProperty("第三方错误提示")
    private String thirdPushErrorMsg;
    @ApiModelProperty("第三方提示")
    private String thirdPushMsg;
    @ApiModelProperty("推送到第三方的json数据")
    private String thirdStateFinishContentJson;
    @ApiModelProperty(value = "客户类型")
    private String customType;
    @ApiModelProperty(value = "产品分类")
    private String productType;
    @ApiModelProperty(value = "产品品牌")
    private String productBrand;
    @ApiModelProperty(value = "产品名称")
    private String productName;
    @ApiModelProperty(value = "处理方式")
    private Integer approach;

    @ApiModelProperty(value = "取消原因")
    private Integer cancelReason;
    @ApiModelProperty(value = "是否需要再次上门")
    private Integer isWorkAgain;
    @ApiModelProperty(value = "再次上门原因")
    private String workAgainMsg;
    @ApiModelProperty(value = "签单图")
    private String signImage;
    @ApiModelProperty(value = "是否拨通电话")
    private Integer isCall;
    @ApiModelProperty(value = "是否已推送上门时间")
    private Integer isYsm;
    @ApiModelProperty(value = "签到时间")
    private Date signTime;
    @ApiModelProperty(value = "申请结单时间")
    private Date jdTime;
    @ApiModelProperty(value = "是否待核销")
    private Integer isHx;
    @ApiModelProperty(value = "是否暂挂")
    private Integer isPause;
    @ApiModelProperty(value = "是否退回单")
    private Integer isReturn;
    @ApiModelProperty(value = "快递公司")
    private Integer expressCompany;
    @ApiModelProperty(value = "快递单号")
    private String expressNbr;
}
